﻿package {
	import flash.display.*;
	import flash.events.*;
	public class Schalter extends Sprite {
		var meineP:Platte;
		var rotate:int; // 90 oder 0
	public function Schalter () {
		addEventListener(MouseEvent.CLICK, mouseClickListener);
	}
	private function mouseClickListener(e:MouseEvent){
		meineP.schalte();
		if (rotate==0) rotate = 270;
		else rotate = 0;
		this.rotation = rotate;
	}
	public function setzeMeinePlatte (p:Platte):void {
		meineP = p;
	}
	}
}